#define _CRT_SECURE_NO_WARNINGS
#include<iostream>
#include<algorithm>
#include<vector>
using namespace std;

class Solution {
public:
    void moveZeroes(vector<int>& nums) {
        int des = -1;
        int cur = 0;
        while (cur < nums.size())
        {
            
            if (nums[cur] != 0)
            {
                ++des;
                swap(nums[cur], nums[des]);
            }
            ++cur;
        }
    }
};